<template>
  <!-- 添加或修改对话框 -->
  <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false">
    <el-form ref="dataForm" :rules="rules" :model="dataForm" status-icon label-position="left" label-width="100px" style="width: 400px; margin-left:50px;">

      <el-form-item label="顾问姓名">
        <el-input v-model="dataForm.counselorName" />
      </el-form-item>
      <el-form-item label="顾问电话">
        <el-input v-model="dataForm.counselorPhone" type="number"/>
      </el-form-item>
      <el-form-item label="选择行业">
        <div style="display: flex;">
          <el-select v-model="dataForm.categoryId" filterable placeholder="大类" @change="choseBigCategory">
            <el-option v-for="item in bigCategory" :key="item.id" :label="item.categoryName" :value="item.id"/>
          </el-select>
          <el-select v-model="dataForm.smallCategoryId" filterable placeholder="小类" @change="choseSmallCategory">
            <el-option v-for="item in smallCategory" :key="item.id" :label="item.categoryName" :value="item.id"/>
          </el-select>
          <el-select v-model="dataForm.jutiCategoryId" filterable placeholder="具体行业" >
            <el-option v-for="item in jutiCategory" :key="item.id" :label="item.categoryName" :value="item.id"/>
          </el-select>
        </div>
      </el-form-item>
      <el-form-item label="负责人姓名">
        <el-input v-model="dataForm.principalName"/>
      </el-form-item>
      <el-form-item label="负责人电话">
        <el-input v-model="dataForm.principalPhone" type="number"/>
      </el-form-item>
      <el-form-item label="管理人姓名">
        <el-input v-model="dataForm.adminName"/>
      </el-form-item>
      <el-form-item label="管理人电话">
        <el-input v-model="dataForm.adminPhone" type="number"/>
      </el-form-item>
      <el-form-item label="企业地址">
        <el-input v-model="dataForm.companyAddress" />
      </el-form-item>
      <el-form-item label="企业总人数">
        <el-input v-model="dataForm.totalPeopleNum" type="number"/>
      </el-form-item>
      <el-form-item label="劳动者总人数">
        <el-input v-model="dataForm.totalJobPeopleNum" />
      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button size="mini" @click="dialogFormVisible = false">取消</el-button>
      <el-button size="mini" v-if="dialogStatus=='create'" type="primary" @click="createData">确定</el-button>
      <el-button size="mini" v-else type="primary" @click="updateData">确定</el-button>
    </div>
  </el-dialog>
</template>

<script>
    export default {
        name: "addFirm"
    }
</script>

<style scoped>

</style>
